<?php
require_once "jssdk.php";
$jssdk = new JSSDK("wx9c23eb0a5329ce6d", "fe01663819b38717e1106ae02e75d655");
$signPackage = $jssdk->GetSignPackage("http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]");
?>
    <!DOCTYPE html>
    <html>

    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
        <title>Ethics Day</title>
        <link rel="stylesheet" type="text/css" href="./css/cafeipage_1.css">
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-68211850-1', 'auto');
  ga('send', 'pageview');

</script>
    </head>

    <body>
        <div class="layout">
            <!-- <header>
            <img src="./images/head_title_last.png">
        </header> -->
            <section>
                <header>
                    <img src="./images/content_last.png" alt="">
                </header>
                <footer>
                    <a href="./cafei.php">
                        <img src="./images/btn_last.png" alt="">
                    </a>
                </footer>
            </section>
            <footer>
                <img src="./images/footerword_last.png" alt="">
            </footer>
        </div>
            <script type="text/javascript" src="./js/zepto/zepto.min.js"></script>
            <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
            <script type="text/javascript">
        ga('send','pageview','/'+'coffee');
        
        wx.config({
            debug: false,
            appId: '<?php echo $signPackage["appId"];?>',
            timestamp: <?php echo $signPackage["timestamp"];?>,
            nonceStr: '<?php echo $signPackage["nonceStr"];?>',
            signature: '<?php echo $signPackage["signature"];?>',
            jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo']
        });
        wx.ready(function() {
            // 在这里调用 API
            wx.onMenuShareTimeline({
                title: '你有一杯咖啡等待领取', // 分享标题
                link: 'http://ethicsday.6edigital.cn/', // 分享链接
                imgUrl: './images/cafei_paper_log.png', // 分享图标
                success: function() {
                    // 用户确认分享后执行的回调函数
                   ga("send","event","ethicsday","onMenuShareTimeline","Share-Circle-Of-Friends",2)
                },
                cancel: function() {
                    // 用户取消分享后执行的回调函数
                   ga("send","event","ethicsday","onMenuShareTimeline","Share-Circle-Of-Friends",2)
                }
            });
            wx.onMenuShareAppMessage({
                title: '你有一杯咖啡等待领取', // 分享标题
                desc: '竟然有这样的好事，还不赶紧？！', // 分享描述
                link: 'http://ethicsday.6edigital.cn/', // 分享链接
                imgUrl: './images/cafei_paper_log.png', // 分享图标
                type: 'link', // 分享类型,music、video或link，不填默认为link
                dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
                success: function() {
                    // 用户确认分享后执行的回调函数
                    ga("send","event","ethicsday","onMenuShareAppMessage","ShareWeixinMessage",3)
                },
                cancel: function() {
                    // 用户取消分享后执行的回调函数
                    ga("send","event","ethicsday","onMenuShareAppMessage","ShareWeixinMessage",3)
                }
            });
        });
            </script>
    </body>

    </html>
